<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>梦芭莎</title>
		<link rel="stylesheet" type="text/css" href="__ROOT__/Index/Common/css/head_end.css" />
		<link rel="stylesheet" type="text/css" href="__ROOT__/Index/Common/css/index.css"/>
		<link rel="stylesheet" type="text/css" href="__ROOT__/Index/Common/css/side_bar.css"/>
		<script type="text/javascript" src="__ROOT__/Index/Common/js/jquery-3.2.1.min.js"></script>
		<script type="text/javascript" src="__ROOT__/Index/Common/js/index.js"></script>
		<script type="text/javascript" src="__ROOT__/Index/Common/js/head_end.js"></script>
		<style>
			.conta area{
                outline: none;
            }
		</style>
	</head>
	<body class="body_bg2">
		<div class="head">
			<include file="./Index/Common/public/header.html" />
		</div>
		<div class="content">
			<!--背景图-->
			<div class="conta">
				<div class="conta_son">
					<a href="">
						<img src="http://qxu1142120069.my3w.com/MoonBaSaImg/index/index1_small.jpg" alt="" />
					</a>
				</div>
			</div>
			<div class="conta" style="background: url(http://qxu1142120069.my3w.com/MoonBaSaImg/index/index2_big.jpg) #fff no-repeat top center;">
				<div class="conta_son">
					<img usemap="#Mapnew9" src="http://qxu1142120069.my3w.com/MoonBaSaImg/index/index2_small.jpg" alt="" />
					<map name="Mapnew9">
						<area shape="rect" style="" coords="416,1707,637,2199" href="__APP__/detail/index?id=34" alt="" />
						<area shape="rect" coords="9,308,471,1218" href="__APP__/detail/index?id=32" alt="" />		
						<area shape="rect" coords="566,485,957,820" href="__APP__/detail/index?id=36" alt="" />	<!--棒球外套-->
						<area shape="rect" coords="579,828,969,1048" href="__APP__/detail/index?id=35" alt="" />  <!--短裤-->
						<area shape="rect" coords="4,1405,415,2070" href="__APP__/detail/index?id=198" alt="" />
						<area shape="rect" coords="651,1140,1101,1826" href="__APP__/detail/index?id=33" alt="" />
						<area shape="rect" coords="415,1471,633,1706" href="__APP__/detail/index?id=199" alt="" />
					</map>
				</div>
			</div>
			<div class="conta" style="background: #ffffff no-repeat center top;">
				<div class="conta_son">
						<img usemap="#M5_5_165444" src="http://qxu1142120069.my3w.com/MoonBaSaImg/index/index3.jpg" alt="" />
						<map name="M5_5_165444">
							<area shape="rect" coords="173,257,648,926" href="__APP__/detail/index?id=200" alt="" />
							<area shape="rect" coords="669,560,996,994" href="__APP__/detail/index?id=202" alt="" />
							<area shape="rect" coords="20,780,168,1018" href="__APP__/detail/index?id=201" alt="" />
							<area shape="rect" coords="935,285,1193,648" href="__APP__/detail/index?id=203" alt="" />
						</map>
						
						
						<img usemap="#M3_28_121711" src="http://qxu1142120069.my3w.com/MoonBaSaImg/index/index4.jpg" alt="" />
						<map name="M3_28_121711">
							<area shape="rect" coords="22,204,311,733" href="__APP__/detail/index?id=158" alt="" />
							<area shape="rect" coords="353,23,651,616" href="__APP__/detail/index?id=204" alt="" />
							<area shape="rect" coords="671,142,1016,673" href="__APP__/detail/index?id=205" alt="" />
						</map>
						
						
						<img usemap="#M3_28_121856" src="http://qxu1142120069.my3w.com/MoonBaSaImg/index/index5.jpg" alt="" />
						<map name="M3_28_121856">
							<area shape="rect" coords="30,30,310,528" href="__APP__/detail/index?id=206" alt="" />
							<area shape="rect" coords="320,36,597,531" href="__APP__/detail/index?id=135" alt="" />
							<area shape="rect" coords="604,36,886,521" href="__APP__/detail/index?id=126" alt="" />
							<area shape="rect" coords="898,37,1179,527" href="__APP__/detail/index?id=207" alt="" />
						</map>
				</div>
			</div>
			<div class="conta" style="background: #ffffff no-repeat center top;">
				<div class="conta_son">
					<img src="http://qxu1142120069.my3w.com/MoonBaSaImg/index/index6.jpg" alt="" />
				</div>
			</div>
			<div class="conta" style="background: url(http://qxu1142120069.my3w.com/MoonBaSaImg/index/index7_big.jpg) #ffffff no-repeat center top">
				<div class="conta_son">
					<!--每张图对应一个map-->
					<img usemap="#M3_28_121943" src="http://qxu1142120069.my3w.com/MoonBaSaImg/index/index7_small.jpg" alt="" />
					<map name="M3_28_121943">
						<area shape="rect" coords="3,139,340,652" href="__APP__/detail/index?id=208" alt="" />
						<area shape="rect" coords="399,126,708,645" href="__APP__/detail/index?id=120" alt="" />
						<area shape="rect" coords="727,101,958,386" href="__APP__/detail/index?id=210" alt="" />
						<area shape="rect" coords="766,397,978,665" href="__APP__/detail/index?id=209" alt="" />
						<area shape="rect" coords="1017,291,1194,696" href="__APP__/detail/index?id=211" alt="" />
					</map>
					
					<img usemap="#M3_28_122132" src="http://qxu1142120069.my3w.com/MoonBaSaImg/index/index8.jpg" alt="" />
					<map name="M3_28_122132">
						<area shape="rect" coords="21,44,303,546" href="__APP__/detail/index?id=212" alt="" />
						<area shape="rect" coords="315,39,596,532" href="__APP__/detail/index?id=213" alt="" />
						<area shape="rect" coords="607,38,879,538" href="__APP__/detail/index?id=214" alt="" />
						<area shape="rect" coords="888,39,1182,532" href="__APP__/detail/index?id=124" alt="" />
					</map>
					
					
				</div>
			</div>
		</div>
		<div class="foot">
			<include file="./Index/Common/public/footer.html" />
		</div>
		<div class="side">
			<include file="./Index/Common/public/side_bar.html" />
			

		</div>
	</body>
	<script type="text/javascript">
	
		$.ajax({
			url:"__APP__/Order/sidecar",
			type:"post",
			dataType:"json",
			success:function(data){
				console.log(data);
				$('.sidebar .num').html(data.length);
				var html="";
				var goods_num=0;
				var price=0;
				for(var i=0;i<data.length;i++){
					var gid=data[i].goodsId;
					var siz = data[i].color;
					var col = data[i].color;
					html+='<div class="classify_item">'+
						'<div class="item_pic">'+
							'<a href="__APP__/detail/index?id='+data[i].goodsId+'"><img width="34" src='+data[i].img+' alt="" /></a>'+
						'</div>'+
						'<div class="item_des">'+
							'<p><a href="__APP__/detail/index?id='+data[i].goodsId+'">'+data[i].name+'</a></p>'+
							'<p><span class="i_size">'+data[i].size+'</span><b class="i_color">'+data[i].color+'</b></p>'+
							'<p class="del_hover">'+
								'<span onclick="del_Car('+data[i].goodsId+',$(this))" class="itemDes-del">删除</span>'+
								'<span class="font_color">￥'+data[i].n_price+'</span><span>*'+data[i].goodsNum+'</span>'+
							'</p>'+
						'</div>'+
					'</div>';
					goods_num+=~~data[i].goodsNum;
					var danjia = ~~data[i].n_price;
					var shuliang = ~~data[i].goodsNum;
					console.log(danjia,shuliang);
					var xiaoji = danjia*shuliang;
					price+=xiaoji;
					console.log(price);
				}
				$('.classify_con').html(html);
				$('.zongShu').html(goods_num);
				$('.zongjiaqian').html(price);
			}
		})
		function del_Car(gId,_this){
			var  goodsId = gId;
			console.log(goodsId);
			var size = _this.parent().parent().find('.i_size').html();
			var color = _this.parent().parent().find('.i_color').html();
			console.log(color);
			$.ajax({
				url:"__APP__/Order/delete",
				type:"post",
				dataType:"json",
				data:{
					goodsId,
					size,
					color
				},
				success:function(data){
					console.log(data);
					if(data.status==1){
						window.location.href="__APP__/Index/index";
					}
				}
			})
		}
	</script>
	
	
</html>
